package com.dlut.DAO;

import com.dlut.bean.Customer;

import java.sql.Connection;
import java.sql.Date;
import java.util.List;

/**
 * 此接口用于规范Customer表的常规操作
 */
public interface CustomerDAO {

    /**
     * 将cust添加到数据库中
     * @param conn
     * @param cust
     */
    void insert(Connection conn, Customer cust);

    void deleteById(Connection conn, int id);

    void updateById(Connection conn, Customer cust);

    Customer getCustomerById(Connection conn, int id);

    List<Customer> getAll(Connection conn);

    Long getCount(Connection conn);

    Date getMaxBirth(Connection conn);
}
